CC = g++
CFLAGS = -Wall
HEADERS = Includes.h Socket.h Packet_Headers.h Utility.h Client.h Server.h

default: netplay

all: netplay
	
netplay: Netplay.o Utility.o Socket.o Client.o Server.o
	$(CC) $(CFLAGS) -o netplay Netplay.o Utility.o Socket.o Client.o Server.o

Netplay.o: Netplay.cpp $(HEADERS)
	$(CC) $(CFLAGS) -c Netplay.cpp

Utility.o: Utility.cpp $(HEADERS)
	$(CC) $(CFLAGS) -c Utility.cpp

Socket.o: Socket.cpp $(HEADERS)
	$(CC) $(CFLAGS) -c Socket.cpp

Client.o: Client.cpp $(HEADERS)
	$(CC) $(CFLAGS) -c Client.cpp

Server.o: Server.cpp $(HEADERS)
	$(CC) $(CFLAGS) -c Server.cpp


clean:
	rm -rf netplay
	rm -rf *.o
